<?php
/**
 * Created by PhpStorm.
 * User: andrei
 * Date: Jul 9, 2012
 * Time: 10:23:34 AM
 * To change this template use File | Settings | File Templates.
 */
 
class Db_Products_DesignImages extends Common {
	protected static $tableName = TAB_DESIGN_IMAGES;
	protected static $dbFields = array(
        'id',
		'di_layout_item_id',
		'di_photo_id',
		'di_iw',
		'di_ih',
		'di_ir',
		'di_ix',
		'di_iy',
		'di_image_filter',
        'deleted'
	);


	/**
	 * @var Db_Products_DesignImages
	 */
	public $objectArray;

	public $id;
	public $di_layout_item_id;
	public $di_photo_id;
	public $di_iw;
	public $di_ih;
	public $di_ir;
	public $di_ix;
	public $di_iy;
	public $di_image_filter;
    public $deleted;

    function __construct($value=NULL, $fieldName=NULL) {
        parent::__construct($value, $fieldName);
    }

	public static function deleteByLiIds($liIds = array()) {
		$liIdsList = implode(',',$liIds);
		return self::$DB->q("DELETE FROM ?f WHERE `di_layout_item_id` IN( ? )",self::$tableName, $liIdsList);
	}

}